.class public Lrexsee/core/widget/LabelDiv;
.super Lrexsee/core/widget/Div;
.source "LabelDiv.java"


# instance fields
.field private final mContainer:Landroid/widget/LinearLayout;

.field public final mIcon:Landroid/widget/ImageView;

.field public final mLabel:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 24
    invoke-direct {p0, p1}, Lrexsee/core/widget/Div;-><init>(Landroid/content/Context;)V

    .line 25
    new-instance v0, Landroid/widget/ImageView;

    invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    .line 26
    new-instance v0, Landroid/widget/TextView;

    invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    .line 27
    new-instance v0, Landroid/widget/LinearLayout;

    invoke-direct {v0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    .line 28
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v0}, Lrexsee/core/widget/LabelDiv;->addDivChild(Landroid/view/View;)V

    .line 30
    return-void
.end method

.method private setImageViewStyle()V
    .locals 6

    .prologue
    .line 76
    :try_start_0
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_visibility:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 77
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getIconLayoutParams()Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 78
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getIconPaddingLeft()I

    move-result v2

    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v3}, Lrexsee/core/style/StyleSheet;->getIconPaddingTop()I

    move-result v3

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getIconPaddingRight()I

    move-result v4

    iget-object v5, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v5}, Lrexsee/core/style/StyleSheet;->getIconPaddingBottom()I

    move-result v5

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/widget/ImageView;->setPadding(IIII)V

    .line 79
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getIconAlpha()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(I)V

    .line 80
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mContext:Landroid/content/Context;

    const/4 v3, 0x0

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->icon_background_color:Ljava/lang/String;

    invoke-static {v2, v3, v4}, Lrexsee/core/style/RexseeDrawable;->getDrawable(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 81
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getIconScaleType()Landroid/widget/ImageView$ScaleType;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 82
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->icon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 87
    :cond_0
    :goto_0
    return-void

    .line 84
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 85
    .local v0, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContext:Landroid/content/Context;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "LabelDiv2:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method

.method private setTextViewStyle()V
    .locals 11

    .prologue
    const/4 v10, 0x1

    const/4 v9, 0x0

    const-string v3, "px"

    const-string v3, ""

    .line 90
    :try_start_0
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->label_visibility:Ljava/lang/String;

    const-string v4, "visible"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 91
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getLabelLayoutParams()Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 92
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->mContext:Landroid/content/Context;

    const/4 v5, 0x0

    iget-object v6, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v6, v6, Lrexsee/core/style/StyleSheet;->label_background_color:Ljava/lang/String;

    invoke-static {v4, v5, v6}, Lrexsee/core/style/RexseeDrawable;->getDrawable(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 93
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getLabelPaddingLeft()I

    move-result v4

    iget-object v5, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v5}, Lrexsee/core/style/StyleSheet;->getLabelPaddingTop()I

    move-result v5

    iget-object v6, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v6}, Lrexsee/core/style/StyleSheet;->getLabelPaddingRight()I

    move-result v6

    iget-object v7, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v7}, Lrexsee/core/style/StyleSheet;->getLabelPaddingBottom()I

    move-result v7

    invoke-virtual {v3, v4, v5, v6, v7}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 94
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->font_size:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v4

    const-string v5, "px"

    const-string v6, ""

    invoke-virtual {v4, v5, v6}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextSize(F)V

    .line 95
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->color:Ljava/lang/String;

    invoke-static {v4}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 96
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    iget-object v5, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v5}, Lrexsee/core/style/StyleSheet;->getTypefaceStyle()I

    move-result v5

    invoke-virtual {v3, v4, v5}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;I)V

    .line 97
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getTextGravity()I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setGravity(I)V

    .line 98
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    .line 99
    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->text_shadow_radius:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v4

    .line 100
    iget-object v5, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v5, v5, Lrexsee/core/style/StyleSheet;->text_shadow_dx:Ljava/lang/String;

    invoke-virtual {v5}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v5

    const-string v6, "px"

    const-string v7, ""

    invoke-virtual {v5, v6, v7}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v5

    .line 101
    iget-object v6, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v6, v6, Lrexsee/core/style/StyleSheet;->text_shadow_dy:Ljava/lang/String;

    invoke-virtual {v6}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v6

    const-string v7, "px"

    const-string v8, ""

    invoke-virtual {v6, v7, v8}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result v6

    .line 102
    iget-object v7, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v7, v7, Lrexsee/core/style/StyleSheet;->text_shadow_color:Ljava/lang/String;

    invoke-static {v7}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v7

    .line 98
    invoke-virtual {v3, v4, v5, v6, v7}, Landroid/widget/TextView;->setShadowLayer(FFFI)V

    .line 103
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->text_link:Ljava/lang/String;

    const-string v5, "autolink"

    invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2

    const/16 v4, 0xf

    :goto_0
    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setAutoLinkMask(I)V

    .line 104
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->text_overflow:Ljava/lang/String;

    const-string v4, "marquee"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 105
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x1

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setFocusable(Z)V

    .line 106
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x1

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setHorizontallyScrolling(Z)V

    .line 107
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    sget-object v4, Landroid/text/TextUtils$TruncateAt;->MARQUEE:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 108
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, -0x1

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setMarqueeRepeatLimit(I)V

    .line 109
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-static {}, Landroid/text/method/ScrollingMovementMethod;->getInstance()Landroid/text/method/MovementMethod;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setMovementMethod(Landroid/text/method/MovementMethod;)V

    .line 122
    :goto_1
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->white_space:Ljava/lang/String;

    const-string v4, "nowrap"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_7

    move v2, v10

    .line 123
    .local v2, "singleLine":Z
    :goto_2
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v3, v2}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 124
    if-nez v2, :cond_0

    .line 125
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->line_height:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    const-string v4, "%"

    const-string v5, ""

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const/16 v4, 0x64

    invoke-static {v3, v4}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v3

    int-to-float v3, v3

    const/high16 v4, 0x42c80000    # 100.0f

    div-float v1, v3, v4

    .line 126
    .local v1, "mult":F
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4, v1}, Landroid/widget/TextView;->setLineSpacing(FF)V

    .line 128
    .end local v1    # "mult":F
    :cond_0
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->label_type:Ljava/lang/String;

    const-string v4, "html"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    if-eqz v3, :cond_8

    .line 130
    :try_start_1
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    invoke-static {v4}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 143
    .end local v2    # "singleLine":Z
    :cond_1
    :goto_3
    return-void

    :cond_2
    move v4, v9

    .line 103
    goto/16 :goto_0

    .line 110
    :cond_3
    :try_start_2
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->text_overflow:Ljava/lang/String;

    const-string v4, "start"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_4

    .line 111
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setHorizontallyScrolling(Z)V

    .line 112
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    sget-object v4, Landroid/text/TextUtils$TruncateAt;->START:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_1

    .line 140
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 141
    .local v0, "e":Ljava/lang/Exception;
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mContext:Landroid/content/Context;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "LabelDiv3:"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4, v10}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v3

    invoke-virtual {v3}, Landroid/widget/Toast;->show()V

    goto :goto_3

    .line 113
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_4
    :try_start_3
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->text_overflow:Ljava/lang/String;

    const-string v4, "end"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_5

    .line 114
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setHorizontallyScrolling(Z)V

    .line 115
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    sget-object v4, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    goto/16 :goto_1

    .line 116
    :cond_5
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->text_overflow:Ljava/lang/String;

    const-string v4, "middle"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_6

    .line 117
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setHorizontallyScrolling(Z)V

    .line 118
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    sget-object v4, Landroid/text/TextUtils$TruncateAt;->MIDDLE:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    goto/16 :goto_1

    .line 120
    :cond_6
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setHorizontallyScrolling(Z)V

    goto/16 :goto_1

    :cond_7
    move v2, v9

    .line 122
    goto/16 :goto_2

    .line 131
    .restart local v2    # "singleLine":Z
    :catch_1
    move-exception v3

    move-object v0, v3

    .line 132
    .restart local v0    # "e":Ljava/lang/Exception;
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    invoke-static {v4}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v4

    invoke-interface {v4}, Landroid/text/Spanned;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_3

    .line 134
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_8
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->label_type:Ljava/lang/String;

    const-string v4, "string"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_9

    .line 135
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    invoke-static {v4}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v4

    invoke-interface {v4}, Landroid/text/Spanned;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_3

    .line 137
    :cond_9
    iget-object v3, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    iget-object v4, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v4, v4, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto/16 :goto_3
.end method


# virtual methods
.method protected final getLabelStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 150
    const-string v0, "icon-width"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 151
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getWidth()I

    move-result v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    .line 159
    :goto_0
    return-object v0

    .line 152
    :cond_0
    const-string v0, "icon-height"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 153
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getHeight()I

    move-result v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 154
    :cond_1
    const-string v0, "label-width"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 155
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getWidth()I

    move-result v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 156
    :cond_2
    const-string v0, "label-height"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 157
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getHeight()I

    move-result v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 159
    :cond_3
    invoke-virtual {p0, p1}, Lrexsee/core/widget/LabelDiv;->getDivStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public getStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 168
    invoke-virtual {p0, p1}, Lrexsee/core/widget/LabelDiv;->getLabelStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected final setLabelStyle()V
    .locals 5

    .prologue
    const/4 v4, 0x1

    const-string v1, "visible"

    .line 34
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getGravity()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 35
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 37
    invoke-virtual {p0}, Lrexsee/core/widget/LabelDiv;->setDivStyle()V

    .line 40
    :try_start_0
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_visibility:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->label_visibility:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 41
    invoke-direct {p0}, Lrexsee/core/widget/LabelDiv;->setTextViewStyle()V

    .line 42
    invoke-direct {p0}, Lrexsee/core/widget/LabelDiv;->setImageViewStyle()V

    .line 43
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_position:Ljava/lang/String;

    const-string v2, "left"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 44
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 45
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 46
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 72
    :cond_0
    :goto_0
    return-void

    .line 47
    :cond_1
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_position:Ljava/lang/String;

    const-string v2, "right"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 48
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 49
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 50
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 68
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 69
    .local v0, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContext:Landroid/content/Context;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "LabelDiv1:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0

    .line 51
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_2
    :try_start_1
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_position:Ljava/lang/String;

    const-string v2, "bottom"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 52
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 53
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 54
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto :goto_0

    .line 56
    :cond_3
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 57
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 58
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto :goto_0

    .line 60
    :cond_4
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon_visibility:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 61
    invoke-direct {p0}, Lrexsee/core/widget/LabelDiv;->setImageViewStyle()V

    .line 62
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto/16 :goto_0

    .line 63
    :cond_5
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->label_visibility:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 64
    invoke-direct {p0}, Lrexsee/core/widget/LabelDiv;->setTextViewStyle()V

    .line 65
    iget-object v1, p0, Lrexsee/core/widget/LabelDiv;->mContainer:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lrexsee/core/widget/LabelDiv;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_0
.end method

.method protected final setLabelStyle(Ljava/lang/String;)V
    .locals 1
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 146
    iget-object v0, p0, Lrexsee/core/widget/LabelDiv;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 147
    invoke-virtual {p0}, Lrexsee/core/widget/LabelDiv;->setLabelStyle()V

    .line 148
    return-void
.end method

.method public setStyle(Ljava/lang/String;)V
    .locals 0
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 164
    invoke-virtual {p0, p1}, Lrexsee/core/widget/LabelDiv;->setLabelStyle(Ljava/lang/String;)V

    .line 165
    return-void
.end method
